﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SMTC.Dao.UserPower;
using SMTC.Model.Model;


namespace SMTC.BO.UserPower
{
    public class UserPowerServices
    {
        private UserPowerDao _dao = new UserPowerDao();

        /// <summary>
        /// 验证用户是否存在-name，psw
        /// </summary>
        /// <param name="userName">用户名</param>
        /// <param name="passWord">密码</param>
        /// <returns>如果存在返回true，否则返回false</returns>
        public bool ValidationUserPower(string userName, string passWord, ref SMT_UserInfo user)
        {
            if (string.IsNullOrEmpty(userName) || string.IsNullOrEmpty(passWord))
            {
                return false;
            }

            userName = userName.Trim();
            passWord = passWord.Trim();
            return _dao.ValidationUserPower(userName, passWord, ref user);
        }
        /// <summary>
        /// 获取权限
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public List<string> Get_UserFunction_List(string UserID)
        {
            return _dao.Get_UserFunction_List(UserID);
        }
        
    }
}
